<?php
require_once 'Zend/Controller/Action/Helper/Abstract.php';

class HTech_Controller_Action_Helper_Utf8 extends Zend_Controller_Action_Helper_Abstract
{
    public function encode($in)
    {        
        if (is_array($in)) {
            $out = array();
            foreach ($in as $key => $value) {
                $out[self::encode($key)] = self::encode($value);
            }
        } elseif(is_string($in)) {
            return utf8_encode($in);
        } else {
            return $in;
        }
        return $out;
    }
}
